<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<jsp:include flush="true" page="getCookie.jsp"></jsp:include>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <script type="text/javascript">
       $(function(){
          $("#moreEmployyelist").bgiframe();
          var place = '<s:property value="#parameters.place"/>';
          var employeeId = '<s:property value="#request.employeeId"/>';
          var isstop = '<s:property value="#request.isstop"/>';
          
          if(place == ''){
            place = '<s:property value="#request.place"/>';
          }
          
          if(employeeId!='' && place!=1){
              changeClass(employeeId , true);
          }else{
	          changeClass(place);
          }
          
          if(isstop == 1){
             alert("你选中的员工已被禁用，如果有需要，请联系统此公司的管理员");
          }
          
          $(document).click(function(){hideElement();});
          showElement();
       });
       
       function getStringLength(str){
			var len = 0;
			var cnstrCount = 0; 
			for(var i = 0 ; i < str.length ; i++){  
				if(str.charCodeAt(i)>255){
					cnstrCount = cnstrCount + 1 ;
				}
			}
			len = str.length + cnstrCount;
			return len;
	   }
	   
       function changeClass(type,isTo){
          
          var objUl = null; // ie6Cover
          $("#mainTopSpaceTab").find("ul").each(function(){
             $(this).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass");
             
             /** 解决li下 , 内容过多 , 换多行的问题  **/
             /*var liContent = $(this).find("li[id='cpyContent']");
             if($(liContent).html()!=null){
                var txt = $(liContent).text().replace(/\t|\s/g , '');
                if(getStringLength(txt)>20){
                  $(liContent).css({"line-height":"auto"});
                }else{
                  $(liContent).css({"line-height":"40px"});
                }
             }*/
             
          });
          
          $("#manEmployee").find("img[id*='man_']").each(function(){
               $(this).attr("src" ,"${pageContext.request.contextPath}/cts/images/cpyman.gif" );
          });
          $("#showHome").find("img").eq(0).attr("src" , "${pageContext.request.contextPath}/cts/images/home.png");
          $("#showLanguage").find("img").eq(0).attr("src" , "${pageContext.request.contextPath}/cts/images/language.png");
          
          if(isTo == true){ // 员工列表
              selectEmployeeId= type;
              $("#employee_"+type).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
              $("#employee_"+type).find("img").eq(0).attr("src" , "${pageContext.request.contextPath}/cts/images/cpy_av_man.gif");
              objUl = $("#employee_"+type);
          }else{
	          if(type == 1){
	             $("#showHome").find("img").eq(0).attr("src" , "${pageContext.request.contextPath}/cts/images/home_active.png");
	             $("#showHome").find("ul").eq(0).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
	             objUl = $("#showHome");
	          }else if(type == 2){
	             $("#showLanguage").find("ul").eq(0).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
	             $("#showLanguage").find("img").eq(0).attr("src" , "${pageContext.request.contextPath}/cts/images/language_active.png");
	             $("#languagelist").hide();
	             //objUl = $("#showLanguage");
	          }else if(type ==3){
	             $("#showReg").find("ul").eq(0).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
	          }else if(type == 4){
	             $("#showLogin").find("ul").eq(0).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
	          }else if(type == 5){
	             $("#moreEmployee").find("ul").eq(0).removeClass("ulClass").removeClass("ulClass_avction").addClass("ulClass_avction");
	             objUl = $("#moreEmployee");
	          }
          } 
          
          var Sys = {};
          var ua = navigator.userAgent.toLowerCase();
		  Sys.ie = window.ActiveXObject ?  ua.match(/msie ([\d.]+)/)[1].replace(/.\d+/ , '') : Sys.ie;
          if(objUl!=null && Sys.ie == '6'){
            var top = objUl.offset().top;
            var left = objUl.offset().left;
            var height = objUl.height();
            var width = objUl.width();
            
            top = top + height;
            $("#ie6Cover").css({
               "top": top ,
               "left": left ,
               "width": width
            }).show();
          }  
          
	   }
	   
	   // 选中员工 emtype[1.更多 , 2.菜单 ]
	   function saveEmployeeToCookie(id , emtype){
	      var url = "cts/saveSelectEmployee?id="+id;
	      $.post(url , "" , function(data){
			  var ary = getEmpArray();
			  var url = "${pageContext.request.contextPath}/cts/searchWork";
			  url += "?selectEmpId="+id;
			  
			  if(ary.length >3){
				var company = '<s:property value="#request.company"/>';
				if(emtype == 2){
				  if(company  == ''){
				    url+="&elem1="+ ary[0];
				    url+="&elem2="+ ary[1];
					url += "&elem3="+ary[2];
				  }else{
					url+="&elem1="+ ary[1];
					url+="&elem2="+ ary[2];
				  }
				}else{
				  if(company  == ''){
				     // 第0个为管理员
					 url+="&elem1="+ id;
					 url+="&elem2="+ selectEmployeeId;
					 //if(ary[2] == selectEmployeeId){
					 //   url+="&elem3="+ ary[1];
					 //}else{
					 //	url+="&elem3="+ ary[1];
					 //}
				  }else{
					  // 第0个为管理员
					  url+="&elem1="+ id;
					  url+="&elem2="+ (selectEmployeeId==ary[0] ? ary[1] : selectEmployeeId );
				  }
				}
				
			  }
			  
	          window.location.href = url;
	      });
	   }
	    
	    
	   	function showSheZhi(obj){
			clearTimeout(obj["timeId"]);
			$("#shezhiDiv").show().bgiframe();
			$(".shezhi").attr("class","shezhi_over");
			isShowElem = true;
		}
		
		function hideSheZhi(obj){
		    isShowElem = false;
			if($("#uploadHeadDiv").css("display") != "none"){
				return;
			}
			obj["timeId"] = setTimeout(function(){
				$("#shezhiDiv").hide();
				$(".shezhi_over").attr("class","shezhi")
			});
		} 
		
		var time = null;
		var langTime = null;
		var eTime = null;
		var lpass = 1;
		var epass = 1;
		var selectEmployeeId = null;
		var isShowElem = false;
		
	    function hideElement(){
          time = window.setTimeout(function(){
            if(!isShowElem){
	            $("#shezhiDiv").hide();
		        $(".shezhi_over").attr("class","shezhi");
            }
		    window.clearTimeout(time);
	      } , 200);
	      
	      if(lpass == 1){
		      langTime = window.setTimeout(function(){
		          $("#languagelist").hide();
		          window.clearTimeout(langTime);
		      } , 100);
	      }
	      
	      if(epass == 1){
		      eTime = window.setTimeout(function(){
		          $("#moreEmployyelist").hide();
		          window.clearTimeout(eTime);
		      } , 100);
	      }
	      
	      lpass = 1;
	      epass = 1;
	    } 
	    
	    function showElement(){
	       // 语言
	       $("#languageHead").click(function(){
	           //lpass = 2;
		       //$("#languagelist").show().bgiframe();
	       });
	       
	       // 更多
	       $("#moreEmployee").click(function(){
	           epass = 2;
		       $("#moreEmployyelist").show().bgiframe();
	       });
	    }
		
	   function getEmpArray(){
		     var ary = [];
		     $("#manEmployee").find("ul").each(function(){
		    	 var nid = $(this).attr("nid");
		    	 if(nid!=''){
		    		 ary.push(nid);
		    	 }
		     });
		     
		     $("#divMoreEmployee").find("ul").each(function(){
		    	 var nid = $(this).attr("nid");
		    	 if(nid!=''){
		    		 ary.push(nid);
		    	 }
		     });
		     
		    return ary;
	   }
	   
	   function sysIdentity(){
	   
	   }
	   
	   
	     // 个人近照
        function resetHead(obj){
		     if(!(document.cookie || navigator.cookieEnabled)){
		        alert("请开启cookie");
		        return;
		     }
		     
		     var randomnumber = Math.floor(Math.random() * 100000);
		     $("#uploadImage").find("iframe[id='headIframeI']").remove();
		     $("#uploadImage").find("div[class='popdiv_content']").html('<iframe id="headIframeI" src="javascript:void(0)" style="width:317px;height:420px;margin:0px;padding:0px;" frameborder="0" scrolling="no"></iframe>'); 
			 $("#uploadImage").find("iframe[id='headIframeI']").attr("src" , "toImageTool?uptype=1&reload=1&randomnumber="+randomnumber+"&userid=<s:property value="#cts_userid"/>");  
		     $("#uploadImage").find("div[class='popdiv_handle']").text("用户头像");
		     openPopDiv( 'uploadImage' , '' ,  200); 
	   }
	   
       function loginx(){
	      openPopDiv( 'loginX' , 'toLogin' ,  150);
       }

       function changeTag(){
          if(typeof(wtype)!='undefined'){
             wtype = -1;
          }
       }
       
       function registerUser(){
	      openOnePopDiv( 'registerUser' , 'toUser' ,  200);
       }
       
       function setUser(type){
          if(type == 1){
            $("#registerUser").find("div[class='popdiv_handle']").text("个人设置");
          }else{
            $("#registerUser").find("div[class='popdiv_handle']").text("用户注册");
          }
          
	      openOnePopDiv( 'registerUser' , 'toUser?toType=1' ,  200);
       }
       
       function registerCompany(){
	      openPopDiv( 'registerCompany' , 'toCompany' ,  200);
       }
	   
	   function findPassWord(){
	      openOnePopDiv( 'findPassWord' , 'tofindPwdPage' ,  200);
	   }   
	   
	   function changeLanguage2(obj){
	       var lg = $(obj).find("option:selected").val();
	       var url = '${pageContext.request.contextPath}/cts/changeLnaguage?language='+lg;
	       window.location.href = url;
	   }
	   
	   function showSelectLanguage(obj){
	       /*var cts_locale = '<s:property value="#cts_locale"/>';
           var top = $(obj).offset().top;
           var left = $(obj).offset().left;
           var height = $(obj).height();
           var width = $(obj).width();
           
           $("#showlanguage2").find("table").find("tr:eq(0)").find("td:eq(0)").html('&nbsp;');
           $("#showlanguage2").find("table").find("tr:eq(1)").find("td:eq(0)").html('&nbsp;');
           var img = '<img src="${pageContext.request.contextPath}/cts/images/yesSel.gif">';
           if(cts_locale == '' || cts_locale == 'zh_CH'){
              $("#showlanguage2").find("table").find("tr:eq(0)").find("td:eq(0)").html(img);
           }else{
              $("#showlanguage2").find("table").find("tr:eq(1)").find("td:eq(0)").html(img);
           }
           
           top = top + height;
           $("#showlanguage2").css({
              "top": top - 41,
              "left": left
           }).show();
           */
           
           $("#showLanguage").find("img[id='languageImg']").attr("src" , "${pageContext.request.contextPath}/cts/images/language_active.png");
	   } 
	   
	   $(function(){
	       var cts_locale = '<s:property value="#cts_locale"/>';
	       if(cts_locale == '' || cts_locale == 'zh_CH'){
		       $("#languageType").find("option[id='zh']").attr("selected" , true);
	       }else{
	       	   $("#languageType").find("option[id='en']").attr("selected" , true);
	       }
	       
	      $(document).click(function(){
		      $("#showLanguage").find("img[id='languageImg']").attr("src" , "${pageContext.request.contextPath}/cts/images/language.png");
	      });
	      
	      if($.browser.mozilla){
	         $("#sleBG2").css({
	            "margin-top":"14px"
	         });
	      }
	      
	      var userAgent = navigator.userAgent.toLowerCase();   
		  jQuery.browsers = {   
		     version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],   
		     safari: /applewebkit/.test( userAgent ) && !/chrome/.test( userAgent ),   
		     chrome: /chrome/.test( userAgent ),  
		     opera: /opera/.test( userAgent ),   
		     msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),   
		     mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )   
		  }; 
		  
		  // apple Safari
	      if($.browsers.safari){
	        $("#languageType").css({
	          "margin-left":"-2px",
	          "margin-top":"-2px"
	        });
	        
	        $("#sleHid").css({
	          "height":"14px"
	        });
	        
	        $("#sleBG2").css({
	          "margin-top":"16px",
	          "background-position":"34px 4px"
	        });
	        
	        $("#languageImg").css({
                "margin-top":"8px"	        
 	        });
 	        
 	        // index
 	        $("#indexPageli").css({
 	           "margin-top":"1px"
 	        });
 	        
	      }
	      
	      // chrome
	      if($.browsers.chrome){
	        $("#sleBG2").css({
	          "margin-top":"12px",
	          "background-position":"34px 6px"
	        });
	        
	        $("#languageImg").css({
	           "margin-top":"7px"
	        });
	        
	         // index
 	        $("#indexPageli").css({
 	           "margin-top":"1px"
 	        });
 	        
 	        //$("#MoreAndMore").css({
 	        //   "width":"60px"
 	        //});
	      }
	      
	      // mozilla
	      if($.browsers.mozilla){
	        $("#sleBG2").css({
	          "background-position":"34px 4px"
	        });
	      }
	   });
    </script>
    
    
    <style type="text/css">
       .showlanguage2{
         width:77px;
         border:1px solid #ececec;
	     position: absolute;
	     background-color:#fff;
         padding: 2px 4px 2px 5px; 
        _padding:5px; line-height:20px;
	    -moz-border-top-right-radius: 6px;
	    -webkit-border-top-right-radius: 6px; 
	     border-top-right-radius: 6px;
	    -moz-border-top-left-radius: 6px;
	    -webkit-border-top-left-radius: 6px;
	     border-top-left-radius: 6px;
	     
       }
       
       .showlanguage2 a{
          text-decoration: none;
          font-size:10px;
       }
       
       .mainTop{
         width:100%;
         height:40px;
         background-color: #F3F3F3;
         border-bottom:1px solid #A9A9A9;
         margin-top:0px;
       }
       
       .tdNoBorder{
          border:none;
       }
       
       .tdBorder{
         border-left:1px solid #A9A9A9;
         border-right:1px solid #A9A9A9;
       }
       
       .ulClass{
          height:40px;
          overflow:hidde;
          position: relative;
       }
       
       .ulClass_avction{
         height:41px;
         _height:48px;
         overflow:hidde;
         background-color:#fff;
         border-left:1px solid #A9A9A9;
         border-right:1px solid #A9A9A9;
         z-index:1000;
       }
       
       .ulClass li{
          float:left;
          cursor: pointer;
       }
       
       .ulClass_avction li{
          float:left;
          cursor: pointer;
    
       }
       
       .tdorrr{
         border:1px solid gray;
       }
    </style>
    
    <style>
		.shezhi{
		   background:none;
		   float:left; 
		   margin-top:7px;
		   padding: 3px 0 2px 9px; 
		   padding-left:8px\9; 
		   _padding:8px; 
		   line-height:20px; 
		   z-index: 999
		 }
		 
		.shezhi_over{
		    border:1px solid #898989; 
		    border-bottom: 1px solid #d3d3cf; 
		    background:#fff; 
		    width:49px; 
		     margin-top:6px; 
		    _margin-top:10px; 
		    _padding-top:4px;
		    height:24px;
		    line-height: 24px;
		    _height:22px;
		}
		
		.shezhiDiv{
			border: 1px solid #898989; 
			background:#fff; 
			width:79px;
			_width:84px; 
		    padding:0 10px; 
		    line-height:24px; 
		    text-align:left; 
		    position: absolute; 
		    
		    margin-top:-9px; 
		    margin-left:20px; 
		    *+margin-left:-43px; 
		    _margin-left:-47px;
		    
		    z-index: 6000; 
		    display: none;
			-moz-border-radius: 6px;
			-webkit-border-radius: 6px; 
			border-radius: 6px;
			-moz-border-top-right-radius: 0;
			-webkit-border-top-right-radius: 0; 
			border-top-right-radius: 0;
		}
		.shezhiDiv div{
			border-bottom: 1px solid #707070; padding: 5px 0;
		}
		.shezhiDiv img{
			margin-right: 5px; vertical-align:middle;
		}
		.shezhiDiv a{color:#393939; text-decoration:none;}
		
		.raduisBorder{
			-moz-border-bottom-right-radius: 6px;
			-webkit-border-bottom-right-radius: 6px; 
			border-bottom-right-radius: 6px;
			-moz-border-bottom-left-radius: 6px;
			-webkit-border-bottom-left-radius: 6px;
			 border-bottom-left-radius: 6px;
		}
		
		#sleBG2{ 
			width:102px; 
			height:24px; 
			border:#a0a0a0 1px solid; 
			height:18px;
			-moz-border-radius: 6px;
			-webkit-border-radius: 6px;
			border-radius: 6px;
			background:url("${pageContext.request.contextPath}/cts/images/downSel.gif") #fff no-repeat 35px 6px; 
			*+background:url("${pageContext.request.contextPath}/cts/images/downSel.gif") #fff no-repeat 34px 4px; 
			_background:url("${pageContext.request.contextPath}/cts/images/downSel.gif") #fff no-repeat 38px 6px; 
			display:block;
		}
		
		.languageContent1{
		  width:52px;
		  height:22px;
		  margin-top:-1px;
		  margin-top:-4px\9;
		  *+margin-bottom:4px;
		  _margin-top:-2px;

		  margin-left:-1px;
		  *+margin-left:-4px;
		  _margin-left:-2px;
		  font-size:12px;
		  font-weight:bold;
		  color:gray;
		  background-color: #F3F3F3;
		}
		</style>
  </head>
  
  <body>
     <div id="mainTopSpace" class="mainTop" style="text-align:center;" align="center">
	       <table align="center" id="mainTopSpaceTab" border="0" cellpadding="0" cellspacing="0" style="width:<s:property value="#request.place == 1 ? '960' : '980'"/>px;;height:100%;font-size:13px;font-weight:bold;color:#686868;">
	         <tr>
	           <s:if test="#request.place == 1">
	              <td width="30px;">&nbsp;</td>
	           </s:if>
	           <s:else>
			       <td width="15px;">&nbsp;</td>
	           </s:else>
	           <td class="tdNoBorder" width="66px;" id="showHome" >
	              <ul class="ulClass" style="line-height: 40px;">
	                 <li><img id="indexPageImg"  src="${pageContext.request.contextPath}/cts/images/home.png" style="margin:7px 4px 0px 0px;_margin-top:8px;"/></li>
	                 <li id="indexPageli" style="padding-top:2px;padding-top:5px\9;*+padding-top:6px;_padding-top:5px;">
	                   <a href="${pageContext.request.contextPath}/cts/index" style="text-decoration: none;">首页</a>
	                 </li>
	              </ul>
	           </td>
	           <td class="tdNoBorder" width="80px;" id="showLanguage">
	              <ul class="ulClass" id="languageHead"  style="line-height: 40px;">
	                 <li><img id="languageImg" src="${pageContext.request.contextPath}/cts/images/language.png" style="margin:6px 4px 0px 0px;*+margin-top:8px;_margin-top:7px;"/></li>
	                 <li onclick="window.setTimeout(function(){showSelectLanguage();} , 10)"> 
	  				    <span id="sleBG2" style="width:45px;margin-top:14px;margin-top:12px\9;*+margin-top:18px;_margin-top:15px;_margin-left:-10px;border:none;background-color: #F3F3F3;*+overflow:hidden;">     
							<span id="sleHid" style="width:31px;*+width:26px;_width:29px;height:16px;*+height:22px;_height:16px;*+margin-top:-8px;*+margin-left:-16px;_margin-top:0px;_margin-left:0px;background-color: #F3F3F3;">   
				  				<select onfocus="showSelectLanguage(this);" onchange="changeLanguage2(this);" name="languageType" class="select languageContent1" id="languageType" style="background-color: #F3F3F3;">
				  					<option id="zh" value="zh">中文</option>
				  					<option id="en" value="en">ENG</option>
				  				</select>
			  				</span>
		  				</span> 
	                 </li>
	              </ul>
	           </td>
	           <td width="28px;">
	               &nbsp;
	           </td>
	           <td id="manEmployee" width="<s:property value="#request.place == 1 ? '565' : '595'"/>px">
	               <s:if test="#request.user==null">&nbsp;</s:if>
	               <s:else>
	                 <s:set var="len" value="#request.len"/>
	                 <s:iterator value="#request.emylist" status="sta">
	                    <ul nid="<s:property value="id"/>" class="ulClass" style="float:left;width:182px;margin-top:-7px;margin-top:-3px\9;" onclick="saveEmployeeToCookie(<s:property value="id"/> , 2)" id="employee_<s:property value="id"/>">
			                 <li><img src="${pageContext.request.contextPath}/cts/images/cpyman.gif" style="margin:12px 4px 0px 4px;" id="man_<s:property value="id"/>"/></li>
			                 <li style='width:155px;height:40px;text-align:left;overflow:hidde;<s:if test="#len[#sta.index] == 0">line-height:40px;</s:if><s:else>padding-top:4px;</s:else>' id="cpyContent" title="<s:property value="company.name"/>[<s:if test="type ==2">管理员</s:if><s:elseif test="type == 1">访客</s:elseif><s:else>员工</s:else>]">
				                <s:property value="company.name"/>[<s:if test="type ==2">管理员</s:if><s:elseif test="type == 1">访客</s:elseif><s:else>员工</s:else>]
			                 </li>
			            </ul>
	                 </s:iterator>
	               </s:else>
	           </td>
	           <td align="left" width="62px" id="moreEmployee" onclick="changeClass(5)">
	             <s:if test="#request.user==null">&nbsp;</s:if>
	             <s:elseif test="#request.emylist2.size > 0">
		             <ul class="ulClass" style="float:left;width:62px;margin-top:-7px;margin-top:-4px\9;line-height:40px;" id="moareEmployeeHead">
				        <li>
				           <div id="MoreAndMore" style="height:20px;line-height:20px;margin-top:11px;margin-top:12px\9;">更多...</div>
					       <div id="moreEmployyelist" style="position: absolute;display:none;
			                          font-weight: normal;color:gray;text-align:center;background-color: #fff;
			                          width:182px;font-size:13px;margin-left:-110px;_margin-left:-115px;margin-top:0px;_margin-top:0px;border:1px solid #A9A9A9;">
			                 <div style="margin:-2px 0px 0px 109px;_margin:-2px 0px 0px 23px;width:62px;height:2px;position:absolute;background: #fff;"></div>
			                 <div id="divMoreEmployee">
				                 <s:iterator value="#request.emylist2">
				                    <ul nid="<s:property value="id"/>" class="ulClass" style="height:auto;line-height:auto;" id="employee_<s:property value="id"/>" onclick="saveEmployeeToCookie(<s:property value="id"/>)">
						                 <li>
						                    <div style="float:left;width:22px;">
						                      <img src="${pageContext.request.contextPath}/cts/images/cpyman.gif" style="margin:10px 4px 0px 4px;" id="man_<s:property value="id"/>"/>
						                    </div>
						                    <div style="float:left;width:155px;text-align: left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" title="<s:property value="company.name"/>[<s:if test="type ==2">管理员</s:if><s:elseif test="type == 1">访客</s:elseif><s:else>员工</s:else>]">
						                         <s:property value="company.name"/>[<s:if test="type ==2">管理员</s:if><s:elseif test="type == 1">访客</s:elseif><s:else>员工</s:else>]													
						                    </div>
						                </li>
						            </ul>
				                 </s:iterator>
			                 </div>
			               </div>
				       </li>
				     </ul>
	             </s:elseif>
	           </td>
	           <s:if test="#request.user==null">
		           <td class="tdNoBorder" width="40px;" id="showReg">
		               <!-- 
		               <ul class="ulClass" style="line-height: 40px;">
			                 <li onclick="registerUser()">免费注册</li>
			           </ul>
		                -->
		                &nbsp;
		           </td>
		           <td class="tdNoBorder" width="100px;" id="showLogin"> 
		             <ul class="ulClass" style="line-height: 40px;margin-left:4px;">
		                    欢迎 ,请 <a href="javascript:loginx();changeTag();">登录</a>
		             </ul>
		           </td>
	            </s:if>
	            <s:else>
	              <td class="tdNoBorder" width="128px;" id="showRegOrLogin">
	                <ul class="ulClass"  style="line-height: 40px;">
		                 <li title="<s:property value="#request.user.userName"/>" style="width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:-2px;margin-top:0px\9;"><s:property value="#request.user.userName"/></li>
		                 <li style="margin:-2px 4px 0px 4px;width:2px;margin-top:0px\9;">|</li>
		                 <li style="margin-top:-1px;margin-top:0px\9;vertical-align: top">
		                    <div class="shezhi"  onmouseover="showSheZhi(this);" onmouseout="hideSheZhi(this)" id="uploadHeadDiv">
		                              帐号<img src="${pageContext.request.contextPath}/cts/images/downSel.gif" align="middle" style="margin:-14px 0 -3px 4px; margin: -4px 0 -3px 4px\9;"/>
		                    </div>
		                 </li>
		              </ul>
		              <div id="shezhiDiv" class="shezhiDiv" style="position: absolute;font-weight: normal;color:gray;">
	           			<div style="float:right; background:#fff; border:none; width: 49px; _width:50px; height:3px; line-height: 0; font-size:0; position:relative; padding:0; margin-top: -2px; margin-right:-10px; _margin-right: -5px;"></div>
	            		<div id="setting_1">
	            		  <table cellpadding="0" cellspacing="0" border="0">
	            		     <tr>
	            		        <td colspan="2">
	            		             <s:if test="#cts_logopath == null">
						               <img id="imgHead" onclick="resetHead(this)" src="${pageContext.request.contextPath}/cts/images/original.jpg" style="width:40px;height:40px;margin-top:4px;cursor:pointer;" title="点击上传用户头像"/>
						             </s:if>
						             <s:else>
	            		         	    <img id="imgHeadTop" onclick="resetHead(this)" src="${pageContext.request.contextPath}/cts/upload/user/<s:property value="#cts_userid"/>/<s:property value="#cts_logopath"/>"  style="width:40px;height:40px;text-align:cetner;margin-left:20px;_margin-left:25px;"/>
						             </s:else>
	            		        </td>
	            		     </tr>
	            		     <tr>
	            		        <td style="height:18px;"><img src="${pageContext.request.contextPath}/cts/images/cpy_av_man.gif" align="middle"/></td>
	            		        <td style="padding-top:3px;"><a href="javascript:setUser(1)">个人设置</a></td>
	            		     </tr>
	            		     <s:if test="#cts_emplcpyid!=null">
			            		 <tr>
			            		     <td style="height:18px;"><img src="${pageContext.request.contextPath}/cts/images/flie_1.png" align="middle" style="width:18px;height:18px;"/></td>
			            		     <td style="padding-top:2px;"><a href="javascript:registerCompany()">公司信息</a></td>
			            		 </tr>
	            		     </s:if>
	            		     <s:if test="#cts_emplcpytype!=1 && #cts_emplcpytype!=null && #cts_emplcpyid!=null">
		            		     <tr>
		            		        <td style="height:18px;"><img src="${pageContext.request.contextPath}/cts/images/setTools.jpg" align="middle" style="width:18px;height:18px;"/></td>
		            		        <td style="padding-top:2px;"><a href="${pageContext.request.contextPath}/cts/findCompanyInfo" target="_blank">公司设置</a></td>
		            		     </tr>
	            		     </s:if>
	            		  </table>
	            		</div>
	            		<div style="border:none;">
	            			<img src="${pageContext.request.contextPath}/cts/images/exit_system.png" align="middle"/><a href="${pageContext.request.contextPath}/cts/logout.action">退出</a>
	            		</div>
	           		  </div>
		           </td>
	            </s:else>
	            <s:if test="#request.place != 1">
		            <td width="10px;">&nbsp;</td>
	            </s:if>
	         </tr>
	       </table>
	       <div id="ie6Cover" style="display:none;position:absolute;height:0px;line-height:0px;background-color: #fff;font-size:0;"></div>
     </div>
  
     <div id="loginX" name="n_loginX" class="popdiv_inner" style="width:400px;">
		<div class="popdiv_inner_outter"></div>
		<div class="popdiv_close"></div>
		<div class="popdiv_handle" title="鼠标左键按住可拖动">用户登录</div>
		<div class="popdiv_content" style="height:250px;">top:200</div>
	</div>
	
	 <div id="registerUser" name="n_registerUser" class="popdiv_inner" style="width:300px;">
		<div class="popdiv_inner_outter"></div>
		<div class="popdiv_close"></div>
		<div class="popdiv_handle" title="鼠标左键按住可拖动">用户注册</div>
		<div class="popdiv_content" style="height:150px;text-align: center;">top:200</div>
	</div>
	
	<div id="registerCompany" name="n_registerCompany" class="popdiv_inner" style="width:300px;">
		<div class="popdiv_inner_outter"></div>
		<div class="popdiv_close"></div>
		<div class="popdiv_handle" title="鼠标左键按住可拖动">公司信息</div>
		<div class="popdiv_content" style="height:150px;text-align: center;">top:200</div>
	</div>
	
	<div id="uploadImage" name="n_uploadImage" class="popdiv_inner" style="width:340px;">
		<div class="popdiv_inner_outter"></div>
		<div class="popdiv_close"></div>
		<div class="popdiv_handle" title="鼠标左键按住可拖动">公司/个人头像</div>
	  <div class="popdiv_content" style="height:420px;">top:200</div>
	</div>
	
	<div id="findPassWord" name="n_findPassWord" class="popdiv_inner" style="width:300px;">
		<div class="popdiv_inner_outter"></div>
		<div class="popdiv_close"></div>
		<div class="popdiv_handle" title="鼠标左键按住可拖动">找回密码</div>
	  <div class="popdiv_content" style="height:150px;">top:200</div>
	</div>
  </body>
</html>

<script type="text/javascript">
  var invited = '<s:property value="#request.invited"/>';
  var userId_0 = '<s:property value="#request.userId"/>';
  var userName_0 = '<s:property value="#request.userName"/>';
  var userState_0 = '<s:property value="#request.userStatus"/>';
  var employeeId_0 = '<s:property value="#request.employeeId"/>';
  var invitedCode_0 = '<s:property value="#request.invitedCode"/>';
  var wtype = '<s:property value="#request.wtype"/>';
  var company = '<s:property value="#request.tocompany.name"/>';
  
  $(function(){
    if(invited == 1){
       loginx();
    }
  });
</script>